Imports Sys = System

Namespace Enhancements.Core.Logging
    ''' <summary>Base class for all possible level mapping types. It is not intended for the common developer to inherit from it.</summary>
    <DebuggerStepThrough()> _
    Public MustInherit Class LevelMapping

        Friend Sub New(ByVal _level As Level, ByVal _overridesDescendants As Boolean)
            Level = _level
            OverridesDescendants = _overridesDescendants
        End Sub

        Private __Level As Level = Level.Off
        ''' <summary>Gets and sets the level used by the instance. The default value is 'Level.Off'.</summary>
        Public Property Level() As Level
            Get
                Return __Level
            End Get
            Set(ByVal _value As Level)
                __Level = _value
            End Set
        End Property

        Private __OverridesDescendants As Boolean = False
        ''' <summary>Gets and sets the value that defines whether this instance should override inner level mappings definitions. The default value is 'false'.</summary>
        Public Property OverridesDescendants() As Boolean
            Get
                Return __OverridesDescendants
            End Get
            Set(ByVal _value As Boolean)
                __OverridesDescendants = _value
            End Set
        End Property

    End Class
End Namespace
